/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Scanner;

/**
 * <p>Project: jse2306 - InputDemo</p>
 * <p>Powered by webrx On 2023-10-12 17:43:59</p>
 * <p>description: </p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class InputDemo {
    public static void main(String[] args) {
        //输入
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入年龄：");
        int i = sc.nextInt();
        System.out.println("请输入姓名：");
        String name = sc.next();


        //输出
        //格式化输出
        //System.out.print("输出123");
        //System.out.println();
        //%s 点位，数据为String字符串 %d代表十进制整数
        System.out.printf("欢迎：%s,你的年龄是：%d岁。%n", name, i);

    }
}
